//清屏
#define clearScreen() printf("\033[2J")
/*#define moveUpCursor(x) printf("\033[%dA", (x))
#define moveDownCursor(x) printf("\033[%dB", (x))
#define moveLeftCursor(x) printf("\033[%dD", (x))
#define moveRightCursor(x) printf("\033[%dC", (x))
*/
#define moveTo(x,y) printf("\033[%d;%dH", (y), (x))



#define SET_COLOR(x) printf("\033[%dm", (x))
//前景色
#define FRONT_BLACK 30
#define FRONT_RED 31
#define FRONT_GREEN 32
#define FRONT_YELLOW 33
#define FRONT_BLUE 34
#define FRONT_PURPLE 35
#define FRONT_DEEP_GREEN 36
#define FRONT_WHITE 37
//背景色
#define BACKGROUND_BLACK 40
#define BACKGROUND_RED 41
#define BACKGROUND_GREEN 42
#define BACKGROUND_YELLOW 43
#define BACKGROUND_BLUE 44
#define BACKGROUND_PURPLE 45
#define BACKGROUND_DEEP_GREEN 46
#define BACKGROUND_WHITE 47


//各种颜色, 可以根据需要更改
#define FRONT_NORMEL FRONT_WHITE
#define BACKGROUND_NORMEL BACKGROUND_BLACK
#define BACKGROUND_CHECKED BACKGROUND_WHITE
#define FRONT_CHECKED FRONT_BLACK
#define FRONT_ALERT FRONT_RED
#define BACKGROUND_ALERT BACKGROUND_WHITE



#define WRITINGX 30
#define LINECOUNTX 27
#define TAGX 2
#define RIGHTSPACE 3

#define CONF_FILE L"SORT.LIST"

#include <stdlib.h>
#include "../IOStream.h"
#include "WinSize.h"


int GET_CURSOR_POSITION_X(void);
int GET_CURSOR_POSITION_Y(void);

ContentList* GET_FILENAMES(void);
ContentList* GET_CONTENT_ARTICLE(void);
void writeLineNumber(int, int);
void printSth(wchar_t);
void fillWritingBoardWithArticle(int, int);
void lineExtend(void);
void _allFileNames(void);
void newLine(void);
void initWriting();
void drawScreen(void);
void articleScroll(int);
void writeDicts(void);
void dictScroll(int);
void cursorUp(void);
void cursorDown(void);
void cursorLeft(void);
void cursorRight(void);
void cursorBack(void);
void _use_checked(void);
void _use_normal(void);
void _use_alert(void);
void _use_input(void);

int GET_CHECKED_DICT_NUM(void);
